package com.libraries.image.view;
//package com.xqdata.yyzx.example.libraries.image.view;
//
//import android.content.Context;
//import android.util.AttributeSet;
//import android.widget.ImageView;
//
///**
// * 正方形的ImageView
// * 
// * @author wellsa
// *
// */
//public class SquareImgView extends ImageView {
//	public SquareImgView(Context context, AttributeSet attrs, int defStyle) {
//		super(context, attrs, defStyle);
//	}
//
//	public SquareImgView(Context context, AttributeSet attrs) {
//		super(context, attrs);
//	}
//
//	public SquareImgView(Context context) {
//		super(context);
//	}
//
//	@Override
//	protected void onMeasure(int widthMeasureSpec, int heightMeasureSpec) {
//		// For simple implementation, or internal size is always 0.
//		// We depend on the container to specify the layout size of
//		// our view. We can't really know what it is since we will be
//		// adding and removing different arbitrary views and do not
//		// want the layout to change as this happens.
//		setMeasuredDimension(getDefaultSize(0, widthMeasureSpec),
//				getDefaultSize(0, heightMeasureSpec));
//
//		// Children are just made to fill our space.
//		int childWidth = getMeasuredWidth();
//		int childHeight = getMeasuredHeight();
//		// 高度和宽度一样
//		heightMeasureSpec = widthMeasureSpec = MeasureSpec.makeMeasureSpec(
//				childWidth, MeasureSpec.EXACTLY);
//		super.onMeasure(widthMeasureSpec, heightMeasureSpec);
//	}
//
//}
